<!--b noi dung-->
<div class="noidung_d fl">
    <div class="breadcrumbs">
        <ul>
            <li class="home"><a href="./trang-chu.html">Trang chủ</a><span>&gt;</span></li>
            <li class="product">
                <strong>Giỏ hàng</strong>
            </li>
        </ul>
    </div>
    <div id="orders_page" style="margin-top: 5px;">
        <form id="checkoutFrm" action="" method="post">
            <div class="orders_col info">
                <h1><div class="icon">1.</div><div class="text">THÔNG TIN</div></h1>
                <div class="clr_fix"></div>
                <div>
                    <div class="frm_item">
                        <p><?php echo $GLOBALS['lng']['fullname'] ?> <span style="color: red; font-size: 11px;">*</span></p>
                        <div class="input-div">
                            <input name="ten_nguoimua" id="ten_nguoimua" autocomplete="off" value="" />
                            <div class="errordiv ten_nguoimua"><div class="arrow"></div><?php echo $GLOBALS['lng']['erremptyname'] ?></div>
                        </div>
                    </div>
                    <div class="frm_item">
                        <div class="col1">
                            <p>Email <span style="color: red; font-size: 11px;">*</span></p>
                            <div class="input-div">
                                <input name="email_nguoimua" id="email_nguoimua" autocomplete="off" value="" />
                                <div class="errordiv email_nguoimua_empty"><div class="arrow"></div><?php echo $GLOBALS['lng']['please_enter_your_email'] ?></div>
                                <div class="errordiv email_nguoimua_fail"><div class="arrow"></div><?php echo $GLOBALS['lng']['please_enter_correct_your_email'] ?></div>
                            </div>
                        </div>
                        <div class="col2">
                            <p><?php echo $GLOBALS['lng']['phone'] ?> <span style="color: red; font-size: 11px;">*</span></p>
                            <div class="input-div">
                                <input name="dienthoai_nguoimua" id="dienthoai_nguoimua" autocomplete="off" value="" />
                                <div class="errordiv dienthoai_nguoimua" style="width: 235px;"><div class="arrow"></div><?php echo $GLOBALS['lng']['order_err_empty_phone'] ?></div>
                            </div>
                        </div>
                        <div class="separator"></div>
                    </div>
                    <div class="frm_item">
                        <p><?php echo $GLOBALS['lng']['shipping_address'] ?> <span style="color: red; font-size: 11px;">*</span><span style="font-size: 11px; color: #ccc; float: right; font-style: italic;"><?php echo $GLOBALS['lng']['number_of_street'] ?></span></p>
                        <div class="input-div">
                            <input name="diachi_giaohang" id="diachi_giaohang" autocomplete="off" value="" />
                            <div class="errordiv diachi_giaohang"><div class="arrow"></div><?php echo $GLOBALS['lng']['order_err_empty_adress'] ?></div>
                        </div>
                    </div>
                    <div class="frm_item" style="width: 290px;">
                        <p style="float: left; padding-top: 10px;"><?php echo $GLOBALS['lng']['city'] ?> <span style="color: red; font-size: 11px;">*</span></p>
                        <div class="input-div" style="float: right;">
                            <select name="address_city" id="address_city" style="border: 1px solid #ccc; width: 180px; padding: 4px; outline: none; background: transparent">
                                <option value=""><?php echo $GLOBALS['lng']['select_city'] ?></option>
                            </select>
                            <div class="errordiv address_city" style="top: 38px; width: 180px;"><div class="arrow"></div><?php echo $GLOBALS['lng']['order_err_empty_city'] ?></div>
                        </div>
                    </div>
                    <div class="separator"></div>
                    <div class="frm_item" style="width: 290px; margin-top: 0px;">
                        <p style="float: left; padding-top: 10px;"><?php echo $GLOBALS['lng']['district'] ?></p>
                        <div class="input-div" style="float: right;">
                            <select name="address_district" id="address_district" style="border: 1px solid #ccc; width: 180px; padding: 4px; outline: none; background: transparent">
                                <option value=""><?php echo $GLOBALS['lng']['select_district'] ?></option>
                            </select>
                            <div class="errordiv address_district" style="top: 38px; width: 180px;"><div class="arrow"></div><?php echo $GLOBALS['lng']['order_err_empty_district'] ?></div>
                        </div>
                    </div>
                    <div class="separator"></div>
                    <div class="frm_item" style="width: 290px; margin-top: 0px;">
                        <p style="float: left; padding-top: 10px;"><?php echo $GLOBALS['lng']['ward'] ?></p>
                        <div class="input-div" style="float: right;">
                            <select name="address_ward" id="address_ward" style="border: 1px solid #ccc;width: 180px; padding: 4px; outline: none; background: transparent">
                                <option value=""><?php echo $GLOBALS['lng']['select_ward'] ?></option>
                            </select>
                            <div class="errordiv address_ward" style="top: 38px; width: 180px;"><div class="arrow"></div><?php echo $GLOBALS['lng']['order_err_empty_ward'] ?></div>
                        </div>
                    </div>
                    <div class="separator"></div>
                    <div class="frm_item" style="padding-bottom: 20px;">
                        <p><?php echo $GLOBALS['lng']['notes'] ?></p>
                        <div class="input-div">
                            <textarea name="khachhang_ghichu" id="khachhang_ghichu" rows="30" height="200px;"></textarea>
                        </div>
                    </div>
                </div>
            </div>
            <div class="orders_col products">
                <h1><div class="icon">2.</div><div class="text"><?php echo $GLOBALS['lng']['orders'] ?></div></h1>
                <div class="clr_fix"></div>
                <div>
                    <div class="orders_head">
                        <div class="item_name"><?php echo $GLOBALS['lng']['order_item'] ?></div>
                        <div class="item_qty"><p><?php echo $GLOBALS['lng']['qty'] ?></p></div>
                        <div class="item_price"><p><?php echo $GLOBALS['lng']['order_price'] ?></p></div>
                        <div class="separator"></div>
                    </div>
                <?php
                $total = 0;
                if (count($carts) && is_array($carts))
                {
                    foreach ($carts as $data)
                    {
                        $thanhtien = $data['gia'] * $data['soluong'];
                        $total += $thanhtien;
                    ?>
                    <div class="orders_item">
                        <div class="item_name">
                            <div style="float: left"><a href="./<?php echo $data['catkey'] ?>/<?php echo $data['keyword'] ?>-<?php echo $data['product'] ?>.html"><img src="<?php echo PRO.'thumbs/'.$data['img'] ?>" alt="<?php echo $data['name'] ?>" /></a></div>
                            <h2 style="font-weight: normal; width: 145px; float: left">
                                <a href="./<?php echo $data['catkey'] ?>/<?php echo $data['keyword'] ?>-<?php echo $data['product'] ?>.html"><?php echo $data['name'] ?></a>
                            <?php
                            $pricelist = trim($data['pricelist']);
                            $pricelists = explode("\n", $pricelist);
                            if($pricelist && count($pricelists) > 1)
                            {
                            ?>
                            </h2>
                            <table width="145">
                                <tr>
                                    <th class="pricelist_head" style="padding: 1px;"><?php echo $GLOBALS['lng']['qty'] ?></th>
                                    <th class="pricelist_head" style="padding: 1px;"><?php echo $GLOBALS['lng']['price'] ?></th>
                                </tr>
                                <?php
                                for($n=0; $n < count($pricelists); $n++)
                                {
                                    $pricelist = explode(':', $pricelists[$n]);
                                    $ranges = explode('-', $pricelist[0]);
                                    if($data['soluong'] >= trim($ranges[0]) && (!empty($ranges[1]) && $data['soluong'] <= trim($ranges[1])))
                                    {
                                        $selected = ' selected';
                                    }
                                    else
                                    {
                                        $selected = '';
                                    }
                                    echo '<tr>
                                        <td class="pricelist_td'.$selected.'" style="padding: 1px;">'.$pricelist[0].'</td>
                                        <td class="pricelist_td'.$selected.'" style="padding: 1px;">'.number_format($pricelist[1] * 1000).'đ</td>
                                    </tr>';
                                }
                            ?>
                            </table>
                            <?php
                            }
                            else
                            {
                                echo '<p style="clear: both">'.$GLOBALS['lng']['qty'].': '.number_format($data['gia']).'đ</p></h2>';
                            }
                            ?>
                        </div>
                        <div class="item_qty">
                            <p><?php echo $data['soluong'] ?></p>
                        </div>
                        <div class="item_price"><p><?php echo number_format($thanhtien) ?>đ</p></div>
                        <div class="separator"></div>
                    </div>
                    <?php
                    }
                }
                $vat = 0;
                if($GLOBALS['cfg']['use_vat']) $vat = $total * 0.1;
                $thanhtoan = $total + $vat;
                ?>
                    <div class="orders_footer">
                        <div class="col1" style="text-transform: uppercase;"><?php echo $GLOBALS['lng']['orders_total'] ?></div>
                        <div class="col2"><p>&nbsp;</p></div>
                        <div class="col3"><p class="tongcong"><?php echo number_format($total) ?>đ</p></div>
                        <div class="separator"></div>
                    </div>
                    <?php
                    if($GLOBALS['cfg']['use_vat']) {
                    ?>
                    <div class="orders_footer">
                        <div class="col1">VAT</div>
                        <div class="col2"><p>&nbsp;</p></div>
                        <div class="col3"><span class="vat"><?php echo number_format($vat) ?></span>đ</div>
                        <div class="separator"></div>
                    </div>
                    <?php
                    }
                    if($GLOBALS['cfg']['use_phigiaohang']) {
                    ?>
                    <div class="orders_footer">
                        <div class="col1" style="text-transform: uppercase;"><?php echo $GLOBALS['lng']['shipping'] ?></div>
                        <div class="col2"><p>&nbsp;</p></div>
                        <div class="col3"><span class="phi_giaohang">0</span>đ</div>
                        <div class="separator"></div>
                    </div>
                    <?php
                    }
                    ?>
                    <div class="orders_footer" style="padding-bottom: 20px;">
                        <div class="col1b" style="text-transform: uppercase;"><?php echo $GLOBALS['lng']['payment'] ?></div>
                        <div class="col2b"><span class="tien_thanhtoan"><?php echo number_format($thanhtoan) ?></span>đ</div>
                        <div class="separator"></div>
                    </div>
                </div>
            </div>
            <div class="orders_col method">
                <h1><div class="icon">3.</div><div class="text">HOÀN TẤT</div></h1>
                <div class="clr_fix"></div>
                <div>
                    <div style="text-align: center; padding-top: 10px;"><?php echo $GLOBALS['lng']['order_code'] ?><br /><h1 class="orders_code"><?php echo $order_code ?></h1></div>
                    <div class="frm_item" style="display: none">
                        <input type="hidden" value="0" id="phuongthuc_thanhtoan" name="phuongthuc_thanhtoan" />
                        <ul class="css3-radios">
                            <li><label><input type="radio" class="phuongthuc_thanhtoan" data-value="0" name="phuongthuc" checked="checked" /><span><?php echo $GLOBALS['lng']['payment_method_0'] ?></span></label></li>
                            <li><label><input type="radio" class="phuongthuc_thanhtoan" data-value="1" name="phuongthuc" /><span><?php echo $GLOBALS['lng']['payment_method_1'] ?></span></label></li>
                            <?php
                            if ($GLOBALS['cfg']['paypal_checkout'])
                            {
                            ?>
                            <li><label><input type="radio" class="phuongthuc_thanhtoan" data-value="2" name="phuongthuc" /><span><img src="images/cardtype_paypal.gif" style="margin-top: -19px; float: right;" /></span></label></li>
                            <?php
                            }
                            if ($GLOBALS['cfg']['nganluong_checkout'])
                            {
                            ?>
                            <li><label><input type="radio" class="phuongthuc_thanhtoan" data-value="3" name="phuongthuc" /><span><img src="images/nganluong_button.gif" style="margin-top: -17px; float: right;" /></span></label></li>
                            <?php
                            }
                            if ($GLOBALS['cfg']['baokim_checkout'])
                            {
                            ?>
                            <li><label><input type="radio" class="phuongthuc_thanhtoan" data-value="4" name="phuongthuc" /><span><img src="images/baokim_button.gif" style="margin-top: -15px; float: right;" /></span></label></li>
                            <?php
                            }
                            if ($GLOBALS['cfg']['sohapay_checkout'])
                            {
                            ?>
                            <li><label><input type="radio" class="phuongthuc_thanhtoan" data-value="5" name="phuongthuc" /><span><img src="images/sohapay_button.gif" style="margin-top: -15px; float: right;" /></span></label></li>
                            <?php
                            }
                            ?>
                        </ul>
                    </div>
                    <div class="clr_fix"></div>
                    <div class="frm_item" style="text-align: center; margin-top: 25px;">
                        <button type="submit" class="btn"><span>HOÀN TẤT ĐẶT HÀNG</span></button>
                    </div>
                </div>
            </div>
            <div class="clr_fix"></div>
        </form>
    </div>
</div>
<!--e noi dung-->